<template>
  <div class="whole-box">
  	<div class="firtitle">
  	    <h5 class="text1">
  	            <i class="fa fa-cube"></i> 我的试题
  	        </h5>
  	        <p class="text2">
  	           查看您曾经原创或上传的试题！
  	        </p>
  	</div>
	<div class="panel-body-1">
		<div class="panel-heading">
  	        <div class="btn-group">
  	                <el-button type="primary" plain size="small" @click.native = reload1 >创建</el-button>
  	                <el-button type="primary" plain size="small" @click.native = reload2 >返回</el-button>
  			</div>
  			<div class="text3">
  				<i class="fa fa-fw fa-th"></i>试题列表
  			</div>
			<p class="text4">
			   请选择一个您之前预置的试卷类型或直接创建一个
			</p>
		</div>
		<div class="form-1">
		 <el-table
		    :data="tableData"
		    highlight-current-row
		    style="width: 100%" class="table"
		    :default-sort = "{prop: 'num', order: 'descending'}"
		    id='table_content'>
		    <el-table-column
		      prop="num"
		      label="序号"
		      width="100">
		    </el-table-column>
			<el-table-column
			prop="nandu"
			label="难度"
			width="100">
			</el-table-column>
		    <el-table-column
		      prop="obj"
		      label="适用对象"
		      width="260">
		    </el-table-column>
		    <el-table-column
		      prop="type"
		      label="题型"
		      sortable
		      width="100">
		    </el-table-column>
		    <el-table-column
		    prop="point"
		    label="考点"
		    width="100">
		    </el-table-column>
		    <el-table-column label="操作">
		      <template >
		        <el-button
		          size="small"
		          type="success"
		          @click="view">查看</el-button>
		      </template>
		    </el-table-column>
		 </el-table>
		</div>
		 <el-pagination
		    background
		    :pager-count="5"
		    layout="prev, pager, next"
		    :total="50"
		    class="page">
		 </el-pagination> 
	</div>
  </div>
</template>

<script>
export default {
  name: 'Mine',
  methods: {
      reload1() {
              this.$router.replace('/OriginalQuestion')
            },
	  reload2() {
	          this.$router.replace('/index')
	        },
	  formatter(row, column) {
	    return row.address;
	  },
	  view() {
			  this.$router.replace('/View_Question')
			}},
  components: {},
  data() {
    return {
		
		tableData: [{
		          date: '2016-05-02',
		          name: '王小虎',
		          address: '上海市普陀区金沙江路 1518 弄'
		        }, {
		          date: '2016-05-04',
		          name: '王小虎',
		          address: '上海市普陀区金沙江路 1517 弄'
		        }, {
		          date: '2016-05-01',
		          name: '王小虎',
		          address: '上海市普陀区金沙江路 1519 弄'
		        }, {
		          date: '2016-05-03',
		          name: '王小虎',
		          address: '上海市普陀区金沙江路 1516 弄'
		        }]
    }
  }
}
</script>

<style scoped>
	.whole-box {
	  width: 100%;
	  display: flex;
	  flex-direction: column;
	  overflow: auto;
	}
	.firtitle {
	 margin:20px 0;
	 background-color: white;
	 border: 1px solid transparent;
	 border-radius: 3px;
	 padding: 15px 0 15px 15px;
	 -webkit-box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.125);
	 box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.125);
	 text-align: left;
	}
	
	.text1 {
	  font-size: 14px;
	  font-weight: 400;
	  color: black;
	  margin: 0 0 0 0;
	}
	
	.text2 {
	  font-size: 10px;
	  color: #777777;
	  margin: 0 0 0 0;
	}
	.text3 {
	  font-size: 18px;
	  font-weight: 500;
	  margin: 0 0 0 0;
	}
	.text4{
	  font-size: 10px;
	  color: #777777;
	  margin: 0 0 0 0;
	}
	.btn-group {
	   float: right;
	   margin-right: 15px;
	}
	
	.panel-body-1 {
		margin-bottom: 20px;
		background-color: white;
		border: 1px solid transparent;
		border-radius: 3px;
		-webkit-box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.125);
		box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.125);
		text-align: left;
	}
	
	.panel-heading {
	  border-bottom: 1px solid #eeeeee;
	  padding: 15px 0 15px 15px;
	}
	
	.table {
	  padding: 0 10px 0 10px;
	}
	
	.page {
	  margin-top: 20px;
	  float: right;
	}
	
	.form-1 {
	  margin-bottom: 20px;
	}
	
    
</style>
